package com.jlpay.openapi.demo.fund.deferred;

import com.jlpay.open.jlpay.sdk.java.model.fund.deferred.request.DeferredActivationQueryRequest;
import com.jlpay.open.jlpay.sdk.java.model.fund.deferred.response.DeferredActivationQueryResponse;
import com.jlpay.open.jlpay.sdk.java.utils.json.JsonUtils;
import com.jlpay.openapi.demo.JlpayOpenApiService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author chenjunhong
 * @since 2024/12/20
 */
public class DeferredActivationQueryService {

    private static final Logger LOGGER = LoggerFactory.getLogger(DeferredActivationQueryService.class);

    public static void main(String[] args) {
        DeferredActivationQueryRequest deferredActivationQueryRequest = buildDeferredActivationQueryRequest();
        DeferredActivationQueryResponse deferredActivationQueryResponse = JlpayOpenApiService.openMerchService()
                .post(deferredActivationQueryRequest, DeferredActivationQueryResponse.class);
        LOGGER.info("查询资金管控状态响应:{}", JsonUtils.toString(deferredActivationQueryResponse));
    }

    private static DeferredActivationQueryRequest buildDeferredActivationQueryRequest() {
        DeferredActivationQueryRequest deferredActivationQueryRequest = new DeferredActivationQueryRequest();
        deferredActivationQueryRequest.setMerchNo("849551860110001");
        return deferredActivationQueryRequest;
    }
}
